package com.nosweattechnet.placemap;

import android.content.Intent;
import android.os.Bundle;

import com.nosweattechnet.mapmyway.R;
import com.nosweattechnet.server.AddItemLocationAsyncTask;

//Activity in charge of getting location of new Item
public class AddItemLocationActivity extends AddItemActivity {
	private String itemid;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent=getIntent();
		//Extract item ID from intent
        itemid=intent.getStringExtra(getString(R.string.item_id_intent));
	}
	
	//When user touches screen
	protected void onTouchEvent(float x, float y, float z){
		AddItemLocationAsyncTask ailat=new AddItemLocationAsyncTask(itemid,x,y);
		ailat.execute();
		DisplayItems.reloadItem(itemid);
    	finish();
    }
}
